﻿using System;
using System.Collections.Generic;
using System.Text;
using TntOrm;
using TntOrm.Attributes;

namespace SiteObjects
{
    [OrmTable( "WEB_Photo", "Фотографии", false ) ]
    public class Photo : OrmDataBaseObject
    {
        private int? id_Photo;

        [OrmTableField( "id_Photo", System.Data.SqlDbType.Int, false )]
        [OrmPrimaryKey]
        public int? PhotoID
        {
            get { return id_Photo; }
            set { id_Photo = value; }
        }

        private string _Name;

        [OrmTableField( "Name", System.Data.SqlDbType.NVarChar, 200, false )]
        public string Name
        {
            get { return _Name; }
            set { _Name = value; }
        }

        private string _NameEng;

        [OrmTableField( "NameEng", System.Data.SqlDbType.NVarChar, 200, false )]
        public string NameEng
        {
            get { return _NameEng; }
            set { _NameEng = value; }
        }

        private string _Alt;

        [OrmTableField( "Alt", System.Data.SqlDbType.NVarChar, 100, false )]
        public string Alt
        {
            get { return _Alt; }
            set { _Alt = value; }
        }

        private string _AltEng;

        [OrmTableField( "AltEng", System.Data.SqlDbType.NVarChar, 100, false )]
        public string AltEng
        {
            get { return _AltEng; }
            set { _AltEng = value; }
        }

        private string _Filename;

        [OrmTableField( "Filename", System.Data.SqlDbType.VarChar, 100, false )]
        public string Filename
        {
            get { return _Filename; }
            set { _Filename = value; }
        }

        private int _FileSize;

        [OrmTableField( "Size", System.Data.SqlDbType.Int, false )]
        public int FileSize
        {
            get { return _FileSize; }
            set { _FileSize = value; }
        }

        private byte[] _PhotoImg;

        [OrmTableField( "Photo", System.Data.SqlDbType.Image, true )]
        public byte[] PhotoImg
        {
            get { return _PhotoImg; }
            set { _PhotoImg = value; }
        }

        private byte[] _SmallPhotoImg;

        [OrmTableField( "SmallPhoto", System.Data.SqlDbType.Image, true )]
        public byte[] SmallPhoto
        {
            get { return _SmallPhotoImg; }
            set { _SmallPhotoImg = value; }
        }
    }
}